<template>
  <div class="fly-panel">
    <div class="fly-panel-title fly-filter">
      <a>置顶</a>
      <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">去签到</a>
    </div>
    <my-listItem :list="lists" :isShowMore="false"></my-listItem>
  </div>
</template>
<script>
import ListItem from '@/components/content/ListItem';
import { getTopList } from '@/api/content';

export default {
  name: 'Top',
  components: {
    'my-listItem': ListItem
  },
  data () {
    return {
      page: 0,
      limit: 5,
      lists: [{
        uid: {
          name: 'imooc',
          isVip: '1',
          pic: '/img/header.jpg'
        },
        title: '大前端课程',
        content: '',
        created: '2019-10-01 01:00:00',
        catalog: 'ask',
        fav: 40,
        isEnd: '0',
        reads: 10,
        answer: 0,
        status: 0,
        isTop: 0,
        tags: [{
          name: '精华',
          class: ' layui-bg-red'
        }, {
          name: '热闹',
          class: 'layui-bg-blue'
        }]
      }, {
        uid: {
          name: 'imooc',
          isVip: '1',
          pic: '/img/header.jpg'
        },
        title: '大前端课程',
        content: '',
        created: '2021-5-01 01:00:00',
        catalog: 'ask',
        fav: 40,
        isEnd: '0',
        reads: 10,
        answer: 0,
        status: 0,
        isTop: 0,
        tags: [{
          name: '精华',
          class: ' layui-bg-red'
        }, {
          name: '热闹',
          class: 'layui-bg-blue'
        }]
      }]
    };
  },
  methods: {
    _getList () {
      getTopList().then(res => {
        this.lists = res.data;
      });
    }
  },
  mounted () {
    this._getList();
  }
};
</script>
<style scoped lang="scss">

</style>
